package com.linq.cool.beauty.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.linq.cool.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author: yqlin
 * @Date: 2021/2/11 00:43
 * @Description: 订单项表
 * @Version: 1.0.0
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "beauty_order_item")
public class BeautyOrderItem extends BaseEntity {
    /**
     * 订单项id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 订单id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 商品id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "product_id")
    private Long productId;

    /**
     * 商品图片
     */
    @TableField(value = "product_pic")
    private String productPic;

    /**
     * 商品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 销售价格
     */
    @TableField(value = "product_price")
    private BigDecimal productPrice;
    /**
     * 品牌id
     */
    @TableField(value = "brand_id")
    private Long brandId;

    /**
     * 品牌名称
     */
    @TableField(value = "brand_name")
    private String brandName;

    /**
     * 商品分类id
     */
    @TableField(value = "product_category_id")
    private Long productCategoryId;

    /**
     * 积分
     */
    @TableField(value = "integration")
    private BigDecimal integration;

    /**
     * 服务店面id
     */
    @TableField(value = "service_store_id")
    private Long serviceStoreId;

    /**
     * 服务店面
     */
    @TableField(value = "service_store_name")
    private String serviceStoreName;

    /**
     * 是否删除(0 未删除 1已删除)
     */
    @TableLogic
    @TableField(value = "is_deleted")
    private Integer isDeleted;
    /**
     * 评价状态(0: 未评价 1:已评价)
     */
    @TableField(value = "is_evaluation")
    private Integer isEvaluation;

    /**
     * 评论时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "evaluation_time")
    private Date evaluationTime;
}